package com.lyh.notes.service;

import com.lyh.notes.model.base.ApiResponse;
import com.lyh.notes.model.base.EmptyVO;
import com.lyh.notes.model.dto.collection.CollectionQueryParams;
import com.lyh.notes.model.dto.collection.CollectionUpdateParams;
import com.lyh.notes.model.dto.collection.CreateCollectionBody;
import com.lyh.notes.model.dto.collection.UpdateCollectionBody;
import com.lyh.notes.model.vo.collection.CollectionVO;
import com.lyh.notes.model.vo.collection.CreateCollectionVO;
import org.springframework.transaction.annotation.Transactional;

import javax.validation.Valid;
import java.util.List;

@Transactional
public interface CollectionService {
    /**
     * 获取收藏夹列表
     *
     */
    ApiResponse<List<CollectionVO>> getCollections(CollectionQueryParams queryParams);

    /**
     * 创建收藏夹
     *
     */
    ApiResponse<CreateCollectionVO> createCollection(CreateCollectionBody requestBody);

    /**
     * 删除收藏夹
     */
    ApiResponse<EmptyVO> deleteCollection(Integer collectionId);

    /**
     * 批量收藏或者取消收藏笔记
     */
    ApiResponse<EmptyVO> batchModifyCollection(UpdateCollectionBody requestBody);

    ApiResponse<EmptyVO> updateCollectionInfo(@Valid CollectionUpdateParams updateParams, Integer collectionId);
}
